<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.util.*"%>
<%
request.setCharacterEncoding("utf-8");//设置页面字符集
DBO db=new DBO();//数据库链接
String   kc="",bj="",js="";//初始化变量
String keyid=(String)request.getParameter("keyid");//主键
String sql="select * from kcap where kcapid="+keyid;//定义查询sql语句
ResultSet rs=null;//定义查询结果集
db.open();//打开数据库链接
rs=db.query(sql);//执行查询结果

/*
课程安排信息修改页面
*/
if(rs.next()){//遍历结果集查询 相应的变量
 kc=rs.getString("kc");
bj=rs.getString("bj");
js=rs.getString("js");

}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK href="../images/style.css" type=text/css rel=stylesheet>
<link rel="stylesheet" type="text/css" media="screen" href="../css/tinyTips.css" />

<script language="javascript">
function checkDo(){
if(form.kc.value==""){
alert("课程不能为空");
return false;
form.kc.focus();
}

if(form.bj.value==""){
alert("班级不能为空");
return false;
form.bj.focus();
}

if(form.js.value==""){
alert("教师不能为空");
return false;
form.js.focus();
}


form.action="kcap_update.jsp";
form.submit();
}
</script>

</head>
<body>

<form name="form" action="" method="post" >
<div class=formzone>
<DIV class=searchzone>

<TABLE height=30 cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD height=30>课程安排修改</TD>
    <TD align=right colSpan=2>&nbsp;</TD>
  </TR></TBODY></TABLE></DIV>
<div class=tablezone>
<div class=noticediv id=notice></div>
<TABLE cellSpacing=0 cellPadding=2 width="100%" align=center border=0>
  <TBODY>

		<tr >
<td align=middle width=100 height=30>课程</td><td height="30" >

<select name="kc">

<option value="">请选择</option>

<%
 sql="select * from kecheng ";
 rs=db.query(sql);
while(rs.next()){
%>

<option value="<%=rs.getString("kcid")%>" <%if(rs.getString("kcid").equals(kc)) out.println("selected");%>><%=rs.getString("kc")%></option>
<% }%>
</select>
</td>
</tr>
<tr >
<td align=middle width=100 height=30>班级</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=bj value="<%=bj%>"></td>
</tr>
<tr >
<td align=middle width=100 height=30>教师</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=js value="<%=js%>"></td>
</tr>

</TBODY></TABLE>
</div>  <input type="hidden" name="keyid" value="<%=keyid%>">
<DIV class=adminsubmit> <input type="button" value="保存" name="B1" class="button" style="width:60px" onclick="checkDo()"  />
                      &nbsp;&nbsp;
                      <input type="reset" value="取消" style="width:60px" name="chanel" class="button" />
</div>
</div>
</form>
</body>
<%
db.close();
%>
</html>
